.img-preview-box {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border: var(--el-border);
  &-title {
    box-sizing: border-box;
    width: 100%;
    height: var(--img-preview-box-title-height);
    line-height:var(--img-preview-box-title-height);
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    border-bottom: var(--el-border);
    background-color: var(--img-preview-box-title-bg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  &-canvas {
    box-sizing: border-box;
    width: 100%;
    height: calc(
      100% - var(--img-preview-box-list-height) - var(--img-preview-box-list-tools-height) -
        var(--img-preview-box-title-height)
    );
    padding: 6px;
    background: linear-gradient(45deg, var(--img-preview-box-grid-color) 25%, transparent 0),
      linear-gradient(45deg, transparent 75%, var(--img-preview-box-grid-color) 0),
      linear-gradient(45deg, var(--img-preview-box-grid-color) 25%, transparent 0),
      linear-gradient(45deg, transparent 75%, var(--img-preview-box-grid-color) 0);
    background-position: 0 0,
      calc(var(--img-preview-box-grid-size) / 2) calc(var(--img-preview-box-grid-size) / 2),
      calc(var(--img-preview-box-grid-size) / 2) calc(var(--img-preview-box-grid-size) / 2),
      var(--img-preview-box-grid-size) var(--img-preview-box-grid-size);
    background-size: var(--img-preview-box-grid-size) var(--img-preview-box-grid-size);
    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      transition: 0.35s;
    }
  }
  &-list {
    box-sizing: border-box;
    width: 100%;
    height: var(--img-preview-box-list-height);
    border-top: var(--el-border);
    display: flex;
    justify-content: space-between;
    background-color: var(--img-preview-box-list-bg);
    &-imgs {
      width: calc(100% - 40px);
      height: 100%;
      &-item {
        width: var(--img-preview-box-list-height);
        height: var(--img-preview-box-list-height);
        box-sizing: border-box;
        display: inline-block;
        position: relative;
        &-img {
          width: calc(var(--img-preview-box-list-height) - 10px);
          height: calc(var(--img-preview-box-list-height) - 10px);
          border: 1px solid var(--el-border-color-light);
          margin-top: 5px;
          box-sizing: border-box;
          display: flex;
          align-items: center;
          justify-content: center;
          opacity: 0.5;
          overflow: hidden;
          transition: 0.35s;
          background-color: var(--img-preview-box-list-img-bg);
          &:hover {
            opacity: 1;
            border-color: var(--img-preview-box-list-img-border-color);
          }
          &-active {
            border-color: var(--img-preview-box-list-img-border-color);
            opacity: 1;
            transition: 0.35s;
          }
          img {
            width: calc(var(--img-preview-box-list-height) - 12px);
            height: calc(var(--img-preview-box-list-height) - 12px);
            box-sizing: border-box;
            cursor: pointer;
            object-fit: contain;
          }
        }
      }
    }
    &-btn {
      width: 20px;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      
    }
  }
  &-list-tools {
    box-sizing: border-box;
    width: 100%;
    height: var(--img-preview-box-list-tools-height);
    border-top: var(--el-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 13px;
    background-color: var(--img-preview-box-list-tools-bg);
    .tools-btns {
      display: flex;
      .tools-btn {
        margin-left: 8px;
        cursor: pointer;
        :deep(.el-icon){
          margin-top: 2px;
        }
        &:hover {
          opacity: 0.8;
        }
      }
    }
  }
}
